# -*- coding: utf-8 -*-

import sys
import logging
from lxml import etree
from xadmin.model import *
from xadmin.lib.base import *
from xadmin.controllers.resource import ResourceController
from xadmin.model.objects import Project

from authkit.authorize.pylons_adaptors import authorize, authorized
from authkit.permissions import RemoteUser, ValidAuthKitUser

log = logging.getLogger(__name__)

class ProjectsController(ResourceController):
    """REST Controller styled on the Atom Publishing Protocol"""
    # To properly map this controller, ensure your config/routing.py file has
    # a resource setup:
    #     map.resource('project', 'projects')

    def __init__(self):
        self.admin = ItemAdministrator(Project)
        self.resource = 'projects'
